<?php 

define('PATH', dirname(dirname(__FILE__)).'/');
require_once(PATH . '../../../wp-blog-header.php');
global $wpdb;

$cat = $_REQUEST['cat'];
$pro = $_REQUEST['pro'];


if($pro!=''&&$cat!=''){
	 $sql = "DELETE FROM $wpdb->term_relationships WHERE object_id in (".$pro.") AND term_taxonomy_id  in (SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id in (".$cat.") and taxonomy = 'category');";
	$wpdb->query($sql);
	echo $pro.'|'.$cat.'|'. $sql ;
	
}
 

  






?>